//
//  FansSysTVView.m
//  1243
//
//  Created by apple on 16/7/27.
//  Copyright © 2016年 1243. All rights reserved.
//

#import "FansSysTVView.h"

@implementation FansSysTVView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = [UIColor whiteColor];
#pragma mark -- 第一部分
        
        self.rowLB = [[UILabel alloc]initWithFrame:CGRectMake(20, 20, 30, 20)];
        self.rowLB.textColor = [UIColor colorWithRed:117/255.0 green:117/255.0 blue:117/255.0 alpha:1];
        self.rowLB.text = @"1";
        self.rowLB.font = [UIFont systemFontOfSize:20];
        
        self.nameLB = [[UILabel alloc]initWithFrame:CGRectMake(70, 10, 150, 20)];
        self.nameLB.font = [UIFont systemFontOfSize:21];
        self.nameLB.text = @"半日闲人";
        
        self.stateLB = [[UILabel alloc]initWithFrame:CGRectMake(70, 35, 100, 15)];
        self.stateLB.text = @"状态:未激活";
        self.stateLB.textColor = [UIColor colorWithRed:135/255.0 green:135/255.0 blue:135/255.0 alpha:1];
        self.stateLB.font = [UIFont systemFontOfSize:16];
        
        self.jiantouImg = [[UIImageView alloc]initWithFrame:CGRectMake(WIDTH - 50, 25, 18, 10)];
        [self.jiantouImg setImage:[UIImage imageNamed:@"icon_xia"]];
        
        self.lineLB =[[UILabel alloc]initWithFrame:CGRectMake(0, 60, WIDTH - 20, 0.5)];
        self.lineLB.backgroundColor = [UIColor colorWithRed:213/255.0 green:213/255.0 blue:213/255.0 alpha:1];
        
        UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
        button.frame = CGRectMake(0, 0, WIDTH, 60);
        [button addTarget:self action:@selector(foldSection) forControlEvents:UIControlEventTouchUpInside];
        [self addSubview:button];
        
        [self addSubview:self.rowLB];
        [self addSubview:self.nameLB];
        [self addSubview:self.stateLB];
        [self addSubview:self.lineLB];
        [self addSubview:self.jiantouImg];
        

    }
    return self;
}

- (void)foldSection{
    if (self.fold) {
        self.fold();
    }
}

@end
